package com.invengo.module_check.ui.fragment.search.item;

import androidx.annotation.NonNull;

import com.invengo.library_db.entity.module_check.BookBean;import com.invengo.module_check.ui.fragment.search.BookSearchViewModel;

import me.goldze.mvvmhabit.base.ItemViewModel;
import me.goldze.mvvmhabit.bus.event.SingleLiveEvent;

public class BookSearchItemViewModel extends ItemViewModel<BookSearchViewModel> {

    public SingleLiveEvent<BookBean> book = new SingleLiveEvent<>();
    public SingleLiveEvent<Boolean> isFind = new SingleLiveEvent<>();

    public BookSearchItemViewModel(@NonNull BookSearchViewModel viewModel, BookBean bean) {
        super(viewModel);
        book.postValue(bean);
        isFind .postValue(false);
    }

    public int getPosition() {
        return viewModel.getPosition(this) + 1;
    }


}
